import request from '@/utils/request'

// 查询全部合同收款
export function getPaymentListAll(params) {
  return request({
    url: '/basic/agreementPaymentInfo/listing',
    method: 'get',
    params: params
  })
}
// 分页查询合同收款
export function getPaymentList(params) {
  return request({
    url: '/basic/agreementPaymentInfo/list',
    method: 'get',
    params,
  })
}
// 查询合同收款信息详情
export function getPaymentInfo(paymentInfoId) {
  return request({
    url: `/basic/agreementPaymentInfo/${paymentInfoId}`,
    method: 'get',
  })
}
// 删除合同收款
export function removePaymentInfo(paymentInfoIds) {
  return request({
    url: `/basic/agreementPaymentInfo/remove/${paymentInfoIds}`,
    method: 'get'
  })
}
// 新增合同收款信息
export function addPaymentInfo(data) {
  return request({
    url: `/basic/agreementPaymentInfo/add`,
    method: 'post',
    data,
  })
}
// 修改合同收款信息详情
export function editPaymentInfo(data) {
  return request({
    url: `/basic/agreementPaymentInfo/edit`,
    method: 'post',
    data,
  })
}
export function dragePaymentOrder(paymentInfoId, data) {
  return request({
    url: `/basic/agreementPaymentInfo/sort/${paymentInfoId}`,
    method: 'post',
    params: data,
  })
}
